package Campus.help.user.dao;

import Campus.help.user.entity.UserCount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

public interface UserCountMapper extends BaseMapper<UserCount> {
    BigDecimal getMoney(Long id);

    boolean addMoney(@Param("id") Long id, @Param("amount")BigDecimal amount);

    boolean payForMoney(@Param("id") Long id, @Param("amount")BigDecimal amount);

    Long initCount(@Param("userId")Long userId);

    boolean returnMoney(@Param("id") Long id, @Param("amount")BigDecimal amount);

    boolean complete(@Param("id") Long id, @Param("amount")BigDecimal amount);
}
